<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // function ave(){
        //     let result = 0
        //     for (let i = 0; i< arguments.length; i++){
        //         result +=arguments[i] 
        //     }
        //     return result/arguments.length
        // }
        // console.log(ave(1,5,7,8,6,5,4,8,4,2,4));
        function getMax(){
            let max = arguments[0]
            for (let i = 1; i < arguments.length; i++) {
                if(arguments[i]>max)
                {
                    max=arguments[i]
                }
            }
            return max
        }
        console.log(getMax(1,7,9,5,4,12,45,79));
    </script>
</body>
</html>